package com.mew.common.rest.user;

import com.zebra.common.ZebraBaseMessage;
import io.netty.buffer.ByteBuf;
import lombok.*;

import java.util.List;

/**
 * @author dylin
 * @create 2021/4/7
 */
@Data
@ToString
@AllArgsConstructor
@NoArgsConstructor
@Builder
public class SimpleUserResponseMessage extends ZebraBaseMessage<SimpleUserResponseMessage> {
    private List<SimpleUserBO> users;

    @Override
    public void write(ByteBuf b) {

        writeInt(b,users.size());
        for (SimpleUserBO user : users) {
            user.write(b);
        }
    }

    @Override
    public SimpleUserResponseMessage read(ByteBuf byteBuf) {
        return null;
    }
}
